﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="adduser.aspx.cs" Inherits="Com.Rivyer.Web.admin.adduser" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>增加用户</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/rivcontent.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 318px;
        }
        .style2
        {
            width: 247px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <%if (DesignMode)
      { %>
    <script type="text/javascript" src="../js/ASPxScriptIntelliSense.js"></script>
    <%} %>
    <script type="text/javascript">
        function onUsernameValidate(s, e) {
            var username = ASPxClientTextBox.Cast(s);
            var usernamelen = username.GetText();
            if (usernamelen.length < 4) {
                e.isValid = false;
            }
        }
    </script>
    <div>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td height="30">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="24" bgcolor="#353c44">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="6%" height="19" valign="bottom">
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="14" height="14" /></div>
                                                    </td>
                                                    <td width="94%" valign="bottom">
                                                        <span class="STYLE1">增加用户</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center" style="font-size: 12px">
                    <div class="rivcontent">
                        <table border="0" cellpadding="45px" cellspacing="0">
                            <tr>
                                <td>
                                    <table border="0" cellpadding="10px" cellspacing="0" style="border: 1px solid #87adbf;
                                        width: 450px; height: 300px; vertical-align: top; text-align: center">
                                        <tr>
                                            <th colspan="2">
                                                增加用户
                                            </th>
                                        </tr>
                                        <tr>
                                            <td>
                                                <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="用户名:" Font-Size="12px">
                                                </dx:ASPxLabel>
                                            </td>
                                            <td align="left" class="style2">
                                                <dx:ASPxTextBox ID="username" runat="server" Width="170px" ValidationSettings-Display="Dynamic"
                                                    ValidationSettings-SetFocusOnError="True" NullText="请输入用户名">
                                                    <ValidationSettings ErrorText="用户名长度不能小于4个字符!" ErrorDisplayMode="ImageWithTooltip">
                                                        <RequiredField ErrorText="不能为空!" IsRequired="true" />
                                                    </ValidationSettings>
                                                    <ClientSideEvents Validation="onUsernameValidate" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="真实姓名:">
                                                </dx:ASPxLabel>
                                            </td>
                                            <td align="left" class="style2">
                                                <dx:ASPxTextBox ID="realname" runat="server" Width="170px" ValidationSettings-Display="Dynamic"
                                                    ValidationSettings-SetFocusOnError="True" NullText="请输入用户名">
                                                    <ValidationSettings ErrorText="有错误!" ErrorDisplayMode="ImageWithToolTip">
                                                        <RequiredField ErrorText="不能为空!" IsRequired="true" />
                                                        <RegularExpression ErrorText="只能为汉字!" ValidationExpression="[\u4e00-\u9fa5]+" />
                                                    </ValidationSettings>
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" align="center">
                                                <dx:ASPxButton ID="btn_add" runat="server" Text="确认添加" HorizontalAlign="Center" OnClick="btn_add_Click">
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
